/**
 * 
 */
package de.gee.erep.client;

import com.google.gwt.core.client.GWT;

import de.gee.erep.client.calls.rpc.CitizenService;
import de.gee.erep.client.calls.rpc.CitizenServiceAsync;
import de.gee.erep.client.calls.rpc.Initialization;
import de.gee.erep.client.calls.rpc.InitializationAsync;

/**
 * @author Matthew Gee created: 13.03.2011
 */
public class Model {
	/***/
	private InitializationAsync init;
	/**
	 * Create a remote service proxy to talk to the server-side Greeting
	 * service.
	 */
	private CitizenServiceAsync citizenService;

	/**
	 * Lazy evaluated LoginServiceHandler-Provider.
	 * 
	 * @return {@link Initialization}
	 */
	public final InitializationAsync getRemoteInitService() {
		if (init == null) {
			init = GWT.create(Initialization.class);
		}
		return init;
	}

	/**
	 * 
	 * @return {@link CitizenServiceAsync}
	 */
	public final CitizenServiceAsync getCitizenService() {
		if (citizenService == null) {
			citizenService = GWT.create(CitizenService.class);
		}
		return citizenService;
	}
}
